package com.hzz.dao.sys;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.hzz.framework.dao.IBaseDao;
import com.hzz.framework.entity.IEntity;

/**
 * <p>宣传引导投票结果 数据库处理接口类。
 */
@Mapper
public interface ISysNewsOptionsVoteDao extends IBaseDao {

    /**
      * 判断是否存在
      */
    @Override
	@Select("select IFNULL(count(0),0) as count from sys_news_options_vote where  id = #{id} ")
    int isDataExist(IEntity entity) throws Exception;

    /**
     * 逻辑删除
     */
    @Override
	@Update("update sys_news_options_vote set  date_updated=now(), del_flag=1 where  id = #{id} ")
    int deleteById(IEntity entity) throws Exception;


    /**
     * 根据主键 物理删除
     */
    @Override
	@Delete("delete from sys_news_options_vote where  id = #{id} ")
    int deleteByPrimaryKey(IEntity entity) throws Exception;

}